<template>
  <div>
    <div class="header">
      <div class="content">
        <img src="../../assets/images/logo.jpg" class="logo" />
        <img src="../../assets/images/ad_top.jpg" class="ad_top" />
      </div>
    </div>

    <div class="content">
      <h1 style="text-align: center; padding-top: 50px">产品详情</h1>
      <div>
        <h1>产品名称：{{ datailData.productName }}</h1>
        <h1>产品价格：{{ datailData.salePrice }}</h1>
        <div v-html="datailData.detail"></div>
      </div>
    </div>

    <div class="footer"></div>
    <div class="foot"></div>
  </div>
</template>
    <script>
export default {
  data() {
    return {
        datailData :{}
    };
  },
  methods: {
    getdata(id) {
      this.$axios
        .get(`http://api.mm2018.com:8095/api/goods/productDet?productId=${id}`)
        .then((res) => {
          this.datailData = res.data;
        });
    },
  },
  created(){
    var pid = this.$route.query.productid
    this.getdata(pid)
  }
};
</script>
    <style scoped>
.header {
  width: 100%;
  height: 104px;
  background: #348408;
}

.content {
  width: 1140px;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
}

.logo {
  float: left;
}

.ad_top {
  float: right;
}

.menu {
  width: 100%;
  height: 52px;
  line-height: 52px;
  border-bottom: 1px solid #dbdbdb;
}

ul {
  margin: 0px;
  padding: 0px;
  list-style-type: none;
}

.menu ul {
  display: flex;
}

.menu ul li {
  width: 124px;
  text-align: center;
}

.bg_active {
  background: #ffa800;
  color: #fff;
}
</style>